\documentclass[12pt]{article}

\begin{document}
\title{testing latex}
\date{}
\author{Alvaro Pereda}
\maketitle

\section{First Section}
Hello world!

\section{Second Section}
\subsection{Introduction}
\begin{equation}
\label{eqn:i}
\sum_{i=1}^n n
\end{equation}

The simplification for Eqn.~\ref{eqn:i} is Eqn.~\ref{eqn:n2}
\begin{equation}
\label{eqn:n2}
n^2
\end{equation}

\begin{enumerate}
\item This is item 1
\item This is item 2
\item This is item 3
\end{enumerate}
\begin{verbatim}
#include <stdio.h>

int main2(char *args) {
  int i, n;
  char * buffer;

  printf ("How long do you want the string? ");
  scanf("%d", &i);

  buffer = (char*) malloc (i+1);

  if (buffer == NULL)
    exit (1);

  for (n=0; n<i; n++) { // to compile for (int i = 0... -std=c99
    buffer[n] = rand() % 26 +'a'; // to compile sqrt -lm
  }
  buffer[i]='\0';

  printf ("Random string: %s\n",buffer);

  free (buffer);

  return 0;
}

\end{verbatim}

\end{document}

